//
//  FirstViewController.m
//  ELife
//
//  Created by Sean Chen on 5/10/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "FirstViewController.h"


@implementation FirstViewController


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    httpRequest = [[M13HttpRequest alloc] init];
    NSURL *url = [NSURL URLWithString:@"http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStore.woa/wpa/MRSS/newreleases/limit=300/rss.xml"];
//    [httpRequest openUrl:url postData:@"1" target:self];
    
}


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}


- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc. that aren't in use.
}


- (void)viewDidUnload
{
    [super viewDidUnload];

    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)iRequestFinished:(NSData *)request
{
    NSMutableString* retStr = [[NSMutableString alloc]  initWithData:request encoding:NSUTF8StringEncoding];
    NSLog(@"%@", retStr);
    myTest* test = [myTest alloc];
    [test start:request];
}

- (void)dealloc
{
    [httpRequest release];
    [super dealloc];
}

@end
